﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Practices.Unity;
using Triunfadores.BusinessEntities;
using Triunfadores.BusinessLogic.Service;
using System.Web.ModelBinding;

namespace Triunfadores.Web.Prestamos
{
    public partial class PagarCuotas : System.Web.UI.Page
    {
        [Dependency]
        public IPrestamoService PrestamoService { get; set; }

        [Dependency]
        public ICuotaPagoService CuotaPagoService { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public IQueryable<Prestamo> GetPrestamosByDniSocio([Control("tbxDniSocio")] string dni)
        {
            return PrestamoService.FindSearchingFromPrestamoByDniCliente(dni).AsQueryable();
        }

        public IEnumerable<CuotaPago> GetCuotasPagoByIdPrestamo([Control("lblIdPrestamo")]Int32 dni)
        {
            return CuotaPagoService.GetAllCuotasPagoByIdPrestamo(dni);
        }

    }
}